import time
fps = 0.0
t1 = time.time()
# 程序运行


fps = (fps + (1. / (time.time() - t1))) / 2
print("fps= %.2f" % (fps))